﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Wicture.QPZS.EPC.API.Domain.Entities;

namespace Wicture.QPZS.EPC.API.Throtteds.VinPrices
{
    public class QueryVinPriceProvider : IApiVinPriceProvider
    {
        public string ApiName => "QueryVin";

        public decimal Provide(ThrottlingContext context)
        {
            if (!context.ServiceDefinition.Name.Equals(ApiName, StringComparison.CurrentCultureIgnoreCase))
            {
                throw new ArgumentOutOfRangeException($"{ApiName}=>{context.ServiceDefinition.Name}");
            }
            throw new ArgumentException();
        }
    }
}
